﻿<UserControl
    x:Class="SoapServiceExample.ForecastEntry"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:SoapServiceExample"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:data="using:SoapServiceExample.Data"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="300">

    <Border Width="230" Height="200" Background="DarkBlue" CornerRadius="20">
        <Grid d:DataContext="{Binding Source={d:DesignInstance Type=data:DesignForecastEntry, IsDesignTimeCreatable=True}}"
            Margin="10"
            Width="210">
            <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="60"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBlock Text="{Binding DayText}"
                    TextWrapping="Wrap" 
                    Style="{StaticResource BodyTextBlockStyle}"
                    HorizontalAlignment="Center"/>
            <Image Width="50" Height="50" Grid.Row="1">
                <Image.Source>
                    <BitmapImage UriSource="{Binding ForecastUri}"/>
                </Image.Source>
            </Image>
            <TextBlock Text="{Binding Description}"
                    Grid.Row="2"
                    Style="{StaticResource CaptionTextBlockStyle}"
                    HorizontalAlignment="Center"
                    Margin="5"/>
            <StackPanel Grid.Row="3"
                    HorizontalAlignment="Center"
                    Orientation="Horizontal">
                <TextBlock Text="Low:"/>
                <TextBlock Text="{Binding TemperatureLow}" Margin="10 0 0 0"/>
                <TextBlock Text=" / High:"/>
                <TextBlock Text="{Binding TemperatureHigh}" Margin="10 0 0 0"/>
            </StackPanel>
            <StackPanel Grid.Row="4"
                    Orientation="Horizontal"
                    HorizontalAlignment="Center">
                <TextBlock Text="Chance of Precipitation:"/>
                <TextBlock Text="{Binding PrecipitationDay}" Margin="10 0 0 0"/>
            </StackPanel>
        </Grid>
    </Border>
</UserControl>
